import java.util.Scanner;

public class Primary{
public static void main(String[] args) {
	Scanner input= new Scanner(System.in);
	System.out.print("What be your name, bro? ");
	String name=input.next();
	Boolean repeat;
	Player character=null;
	do
	{
		repeat=false;
		System.out.print("What class are you?\n1. Warrior (HP:50 Damage:3 Accuracy:7)\n2. Archer (HP:30 Damage:2 Accuracy:8)\n");
		int classType=input.nextInt();
		if(classType==1)
			character = new Warrior(name);
		else if(classType==2)
			character=new Archer(name);
		
		else
		{
			System.out.print("That was not a 1 or a 2\n");
			repeat = true;
		}
	}while(repeat);
	
	do
	{
		repeat=false;
		System.out.print("You encountered an enemy. What do you do?\n1. Attack\n2. Heavy Attack\n");
		int attackType=input.nextInt();
		if(attackType==1)
		{
			int damage=character.attack();
			if(damage>=6)
				System.out.println("You won!!!!!! :DD Homie!!1111!!\n" + "You got an attack of " +damage );
			else
				System.out.println("You lost, sucker!!! bwahaha :DDDDD\nYou did a damage of "+ damage);
		}
		else if(attackType==2)
		{
			int damage=character.heavyAttack();
			if(damage>=6)
				System.out.println("You won!!!!!! :DD Homie!!1111!!\n" + "You got an attack of " +damage );
			else
				System.out.println("You lost, sucker!!! bwahaha :DDDDD\nYou did a damage of "+ damage);
		}
		else
		{
			System.out.print("That was not a 1 or a 2\n");
			repeat = true;
		}
	}while(repeat);
	
	System.out.println("That's it this game is over. Like YOU will be if you keep playing...");

	
	
	input.close();
}
}